package design_pattern.strategy.demo_sort;

import java.util.Comparator;

public class CpuStrategy implements Comparator<Host> {

    @Override
    public int compare(Host o1, Host o2) {
	if(o1.getCpuFrequency() > o2.getCpuFrequency()){
	    return -1;
	}else if(o1.getCpuFrequency() < o2.getCpuFrequency()){
	    return 1;
	}else
	return 0;
    }

}
